package com.xmkj.bearuser.pk;

import android.content.Context;

import com.common.retrofit.bean.ContentDetailsBean;
import com.common.widget.recyclerview.refresh.adapter.CommonAdapter;
import com.common.widget.recyclerview.refresh.adapter.ViewHolder;
import com.xmkj.bearuser.R;

import java.util.List;

/**
 * Create by leo
 * 创建日期：2018/6/27
 * 描述：
 */

public class CommentAdapter extends CommonAdapter<ContentDetailsBean.CommentListBean> {
    public CommentAdapter(Context context, List<ContentDetailsBean.CommentListBean> data) {
        super(context, data);
    }

    @Override
    protected void convert(ViewHolder holder, ContentDetailsBean.CommentListBean item, int position) {
                holder.setImageAvatar(R.id.iv_img,item.face);
                holder.setText(R.id.tv_name,item.nickname);
                holder.setText(R.id.tv_comment,item.content);

    }

    @Override
    protected int getItemViewLayoutId(int position, ContentDetailsBean.CommentListBean item) {
        return R.layout.item_comment;
    }
}
